<template>
    <div class="">
        <h1>Children Component</h1>
        <div  v-for="(user, index) in list" :key="index">
            <div>子组件的遍历：{{ user.name }} - {{ user.age }}</div>
            <div>
                <slot :userObject="user"></slot>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: 'ChildrenComponent',
    props: {
        list: Array
    },
    data () {
        return {
            msg: ''
        };
    },
    mounted: function () {
        console.log('ChildrenComponent mounted');
        console.log(this.list);
    },
    methods: {
        add() {
            
        },
    }
};
</script>
<style scoped>
    
</style>